package dk.degofedal.scala.math

class Tuples(l : List[Int]) {
	
	def sum : Int = {
		l.foldLeft(0){_+_}
	}
	
	override def toString : String = {
		l.toString
	}
}

object Tuples {
	def main(args : Array[String]) : Unit = {
		
		val test = new Tuples(List(1,2,3))
		
		print(test + " = ")
		println(test sum)
	}
}